#include <iostream>
using namespace std ;

int main (){
	int a,b ;
	
	cin >> a ;
	b = a ;
	b = b >> 16 ;
	a = a << 16 ;

	cout << (a | b) << endl ;
  
	return 0 ;	
}
